package zz.demo.springCloud;


import feign.Feign;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import zz.demo.springCloud.feignClient.UserFeignClient;

/**
 * Hello world!
 *
 */
@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
@EnableCircuitBreaker
//@EnableOAuth2Sso
public class OAApplication
{

    public static void main( String[] args )
    {
        SpringApplication.run(OAApplication.class,args);
    }



//    @Bean
//    public FilterRegistrationBean oAuth2AuthenticationProcessingFilter(){
//        FilterRegistrationBean registrationBean = new FilterRegistrationBean();
//        OAuth2AuthenticationProcessingFilter filter = new OAuth2AuthenticationProcessingFilter();
//        filter.setAuthenticationManager(this.authenticationManager);
//        filter.afterPropertiesSet();
//        registrationBean.setFilter(filter);
//        return registrationBean;
//    }
}
